package com.jiayuge.controller;

import com.jiayuge.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 功能: Swagger的是使用  --层
 * <p>Swagger的是使用  --层</p >
 * <ul>
 * <li>数据库: 增 删 改 查 </li>
 * <li>{@link SwaggerController} connect to {@link SwaggerController}</li>
 * </ul>
 *
 * @Program: SpringBoot-Swagger
 * @Date: 2021-09-26 11:01
 * @Version 1.0
 * @Author Jiayu.Yang
 */
@RestController
@RequestMapping("/UseSwagger")
@Api(tags = "为接口添加说明")
public class SwaggerController {


    @GetMapping("/hello")
    @ApiOperation(value = "给请亲求方法添加注释说明")
    public String hello(){
        return "hello swagger";
    }
    @GetMapping("/user")
    @ApiOperation(value = "给请亲求方法添加注释说明")
    public User userController(){
        return new User();
    }
}
